﻿using DocumentFormat.OpenXml.Wordprocessing;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace NP.BPMReportPlatform.Leave.Dto
{
    public class SpecialApproverDto
    {
        /// <summary>
        /// 导入实体
        /// IsLabelingError：是否标注数据错误
        /// </summary>
        [ExcelImporter(IsLabelingError = true)]
        public class ImportInput
        {
            /// <summary>
            /// 工号
            /// </summary>
            [ImporterHeader(Name = "工号")]
            [Required(ErrorMessage = "工号不能为空")]
            public string WorkNumber { get; set; }

            /// <summary>
            /// 姓名
            /// </summary>
            [ImporterHeader(Name = "姓名")]
            [Required(ErrorMessage = "姓名不能为空")]
            public string UserName { get; set; }

            /// <summary>
            /// 一级审批人工号
            /// </summary>
            [ImporterHeader(Name = "一级审批人工号")]
            [Required(ErrorMessage = "一级审批人工号不能为空")]
            public string Approver1Code { get; set; }

            /// <summary>
            /// 一级审批人姓名
            /// </summary>
            [ImporterHeader(Name = "一级审批人姓名")]
            [Required(ErrorMessage = "一级审批人姓名不能为空")]
            public string Approver1Name { get; set; }

            /// <summary>
            /// 二级审批人工号
            /// </summary>
            [ImporterHeader(Name = "二级审批人工号")]
            public string Approver2Code { get; set; }

            /// <summary>
            /// 二级审批人姓名
            /// </summary>
            [ImporterHeader(Name = "二级审批人姓名")]
            public string Approver2Name { get; set; }

            /// <summary>
            /// 三级审批人工号
            /// </summary>
            [ImporterHeader(Name = "三级审批人工号")]
            public string Approver3Code { get; set; }

            /// <summary>
            /// 三级审批人姓名
            /// </summary>
            [ImporterHeader(Name = "三级审批人姓名")]
            public string Approver3Name { get; set; }

            /// <summary>
            /// 四级审批人工号
            /// </summary>
            [ImporterHeader(Name = "四级审批人工号")]
            public string Approver4Code { get; set; }

            /// <summary>
            /// 四级审批人姓名
            /// </summary>
            [ImporterHeader(Name = "四级审批人姓名")]
            public string Approver4Name { get; set; }
        }

        /// <summary>
        /// 导出实体
        /// </summary>
        public class ExportOutput
        {
            /// <summary>
            /// 工号
            /// </summary>
            [ExporterHeader("工号")]
            public string WorkNumber { get; set; }

            /// <summary>
            /// 姓名
            /// </summary>
            [ExporterHeader("姓名")]
            public string UserName { get; set; }

            /// <summary>
            /// 一级审批人工号
            /// </summary>
            [ExporterHeader("一级审批人工号")]
            public string Approver1Code { get; set; }

            /// <summary>
            /// 一级审批人姓名
            /// </summary>
            [ExporterHeader("一级审批人姓名")]
            public string Approver1Name { get; set; }

            /// <summary>
            /// 二级审批人工号
            /// </summary>
            [ExporterHeader("二级审批人工号")]
            public string Approver2Code { get; set; }

            /// <summary>
            /// 二级审批人姓名
            /// </summary>
            [ExporterHeader("二级审批人姓名")]
            public string Approver2Name { get; set; }

            /// <summary>
            /// 三级审批人工号
            /// </summary>
            [ExporterHeader("三级审批人工号")]
            public string Approver3Code { get; set; }

            /// <summary>
            /// 三级审批人姓名
            /// </summary>
            [ExporterHeader("三级审批人姓名")]
            public string Approver3Name { get; set; }

            /// <summary>
            /// 四级审批人工号
            /// </summary>
            [ExporterHeader("四级审批人工号")]
            public string Approver4Code { get; set; }

            /// <summary>
            /// 四级审批人姓名
            /// </summary>
            [ExporterHeader("四级审批人姓名")]
            public string Approver4Name { get; set; }
        }
    }
}
